import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/pages/HelloWorld'

// 用户
import UserList from '@/pages/user/UserList'
import CreateUser from '@/pages/user/CreateUser'
import PermissionList from '@/pages/user/PermissionList'
import CreatePermission from '@/pages/user/CreatePermission'

//文章
import ArticleList from '@/pages/article/ArticleList'
import CreateArticle from '@/pages/article/CreateArticle'
import CommentList from '@/pages/article/CommentList'

//扩展
import ImageUpload from '@/pages/extension/ImageUpload'
import UserAndPermission from '@/pages/extension/UserAndPermission'
import ArticleAndCategory from '@/pages/extension/ArticleAndCategory'

Vue.use(Router)

export default new Router({
  routes: [{
      path: '/',
      component: HelloWorld
    },
    //  用户
    {
      path: '/userlist',
      component: UserList,
    },
    {
      path: '/adduser',
      component: CreateUser,
    },
    {
      path: '/permission',
      component: PermissionList,
    },
    {
      path: '/addpermission',
      component: CreatePermission,
    },
    //  文章
    {
      path: '/articlelist',
      component: ArticleList,
    },
    {
      path: '/addarticle',
      component: CreateArticle,
    },
    {
      path: '/commentlist',
      component: CommentList,
    },
    {
      path: '/articlecount',
      component: UserList,
    },
    {
      path: '/imgupload',
      component: ImageUpload
    },
    {
      path: '/userandpermission',
      component: UserAndPermission
    },
    {
      path: '/articleandcategory',
      component: ArticleAndCategory
    }
  ]
})
